/**
 * Copyright &copy; 2012-2016 <dictdown href="https://github.com/thinkgem/jeesite">JeeSite</dictdown> All rights reserved.
 */
package org.spring.springboot.app.dropdown.dictdown.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.spring.springboot.app.base.R;
import org.spring.springboot.app.sys.dict.domain.vo.SysTypeVO;
import org.spring.springboot.app.sys.dict.service.ISysDictService;
import org.spring.springboot.util.ApiIndex;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.*;


@Api(description = "字典类型查询",tags = ApiIndex.DictdownController)
@RequestMapping(value = "/api/dictType")
@RestController
public class DictdownController {


	@Autowired
	private ISysDictService sysDictService;

	@ApiOperation(value = "查询平台收支明细字典类型")
	@RequestMapping(value = "/platformbalanceLogType", method = RequestMethod.GET)
	public R<List<SysTypeVO>> findType(
			@ApiParam(value = "类型", required = false) @RequestParam(defaultValue = "") String type
	) {
		R<List<SysTypeVO>> result = new R<List<SysTypeVO>>();
		List<SysTypeVO> list = sysDictService.findType(type);
		result.setData(list);
		return result;
	}



}
